Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1783 +/- ##
==========================================
+ Coverage 91.72% 91.88% +0.16%
==========================================
Files 98 101 +3
Lines 20055 20744 +689
==========================================
+ Hits 18395 19061 +666
- Misses 1660 1683 +23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
📦 Cargo Bloat ComparisonBinary size change: +0.40% (24.8 MiB → 24.9 MiB) Expand for cargo-bloat outputHead Branch ResultsBase Branch Results |
⚡️ Hyperfine BenchmarksSummary: 0 regressions, 0 improvements above the 10% threshold. Environment
CLI CommandsBenchmarking basic commands in the main repo:
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base --version |
2.4 ± 0.1 | 2.3 | 2.9 | 1.01 ± 0.06 |
prek-head --version |
2.4 ± 0.1 | 2.2 | 3.1 | 1.00 |
prek list
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base list |
8.9 ± 0.1 | 8.7 | 9.3 | 1.00 |
prek-head list |
9.0 ± 0.1 | 8.8 | 9.7 | 1.01 ± 0.02 |
prek validate-config .pre-commit-config.yaml
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base validate-config .pre-commit-config.yaml |
3.1 ± 0.0 | 3.0 | 3.3 | 1.01 ± 0.02 |
prek-head validate-config .pre-commit-config.yaml |
3.1 ± 0.1 | 3.0 | 3.2 | 1.00 |
prek sample-config
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base sample-config |
2.7 ± 0.3 | 2.5 | 5.0 | 1.02 ± 0.13 |
prek-head sample-config |
2.6 ± 0.1 | 2.5 | 2.8 | 1.00 |
Cold vs Warm Runs
Comparing first run (cold) vs subsequent runs (warm cache):
prek run --all-files (cold - no cache)
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run --all-files |
158.9 ± 5.0 | 154.7 | 169.2 | 1.00 ± 0.03 |
prek-head run --all-files |
158.6 ± 2.1 | 155.4 | 162.1 | 1.00 |
prek run --all-files (warm - with cache)
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run --all-files |
159.5 ± 3.3 | 154.3 | 166.5 | 1.00 |
prek-head run --all-files |
160.2 ± 3.5 | 154.4 | 168.4 | 1.00 ± 0.03 |
Full Hook Suite
Running the builtin hook suite on the benchmark workspace:
prek run --all-files (full builtin hook suite)
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run --all-files |
160.5 ± 4.6 | 154.7 | 180.3 | 1.00 |
prek-head run --all-files |
163.9 ± 38.3 | 152.8 | 428.1 | 1.02 ± 0.24 |
Individual Hook Performance
Benchmarking each hook individually on the test repo:
prek run trailing-whitespace --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run trailing-whitespace --all-files |
22.8 ± 0.6 | 22.1 | 24.2 | 1.03 ± 0.03 |
prek-head run trailing-whitespace --all-files |
22.0 ± 0.3 | 21.5 | 22.7 | 1.00 |
prek run end-of-file-fixer --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run end-of-file-fixer --all-files |
28.9 ± 2.7 | 25.0 | 37.4 | 1.00 |
prek-head run end-of-file-fixer --all-files |
28.9 ± 2.3 | 25.9 | 33.2 | 1.00 ± 0.12 |
prek run check-json --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run check-json --all-files |
13.1 ± 0.3 | 12.6 | 13.7 | 1.02 ± 0.05 |
prek-head run check-json --all-files |
12.8 ± 0.5 | 11.8 | 14.0 | 1.00 |
prek run check-yaml --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run check-yaml --all-files |
12.2 ± 0.3 | 11.8 | 12.9 | 1.00 |
prek-head run check-yaml --all-files |
12.3 ± 0.3 | 11.9 | 13.1 | 1.00 ± 0.03 |
prek run check-toml --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run check-toml --all-files |
12.7 ± 0.4 | 12.1 | 13.8 | 1.02 ± 0.04 |
prek-head run check-toml --all-files |
12.5 ± 0.3 | 11.9 | 13.3 | 1.00 |
prek run check-xml --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run check-xml --all-files |
12.5 ± 0.4 | 11.7 | 13.1 | 1.00 |
prek-head run check-xml --all-files |
12.8 ± 1.7 | 12.0 | 20.6 | 1.02 ± 0.14 |
prek run detect-private-key --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run detect-private-key --all-files |
18.9 ± 1.3 | 16.7 | 21.8 | 1.00 |
prek-head run detect-private-key --all-files |
19.1 ± 1.4 | 16.9 | 22.4 | 1.01 ± 0.10 |
prek run fix-byte-order-marker --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run fix-byte-order-marker --all-files |
24.8 ± 1.7 | 21.2 | 27.3 | 1.03 ± 0.10 |
prek-head run fix-byte-order-marker --all-files |
24.1 ± 1.8 | 21.4 | 27.6 | 1.00 |
Installation Performance
Benchmarking hook installation (fast path hooks skip Python setup):
prek install-hooks (cold - no cache)
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base install-hooks |
4.8 ± 0.0 | 4.8 | 4.9 | 1.01 ± 0.02 |
prek-head install-hooks |
4.8 ± 0.1 | 4.7 | 4.8 | 1.00 |
prek install-hooks (warm - with cache)
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base install-hooks |
4.8 ± 0.0 | 4.7 | 4.8 | 1.00 |
prek-head install-hooks |
4.8 ± 0.1 | 4.7 | 4.9 | 1.00 ± 0.02 |
File Filtering/Scoping Performance
Testing different file selection modes:
prek run (staged files only)
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run |
53.9 ± 1.1 | 52.2 | 56.5 | 1.00 |
prek-head run |
54.2 ± 1.4 | 52.0 | 56.8 | 1.00 ± 0.03 |
prek run --files '*.json' (specific file type)
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run --files '*.json' |
9.2 ± 0.2 | 8.9 | 9.6 | 1.00 |
prek-head run --files '*.json' |
9.2 ± 0.2 | 8.9 | 9.8 | 1.00 ± 0.03 |
Workspace Discovery & Initialization
Benchmarking hook discovery and initialization overhead:
prek run --dry-run --all-files (measures init overhead)
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run --dry-run --all-files |
14.5 ± 0.4 | 14.0 | 15.4 | 1.01 ± 0.03 |
prek-head run --dry-run --all-files |
14.3 ± 0.3 | 14.0 | 15.1 | 1.00 |
Meta Hooks Performance
Benchmarking meta hooks separately:
prek run check-hooks-apply --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run check-hooks-apply --all-files |
14.2 ± 0.8 | 12.7 | 15.1 | 1.10 ± 0.06 |
prek-head run check-hooks-apply --all-files |
13.0 ± 0.2 | 12.7 | 13.3 | 1.00 |
prek run check-useless-excludes --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run check-useless-excludes --all-files |
13.1 ± 0.4 | 12.7 | 14.1 | 1.00 |
prek-head run check-useless-excludes --all-files |
13.1 ± 0.3 | 12.7 | 13.7 | 1.00 ± 0.04 |
prek run identity --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run identity --all-files |
11.3 ± 0.1 | 11.2 | 11.6 | 1.00 |
prek-head run identity --all-files |
11.4 ± 0.3 | 11.1 | 12.1 | 1.01 ± 0.03 |
2625a90 to
c44b3ea
Compare
There was a problem hiding this comment.
Pull request overview
Adds first-class .NET (language: dotnet) support to prek, including SDK selection via language_version, tool installation via additional_dependencies, documentation updates, and CI wiring to run the new language test suite.
Changes:
- Implement
dotnetlanguage: SDK discovery/download +dotnet tool install --tool-pathdependency support. - Add unit + integration tests for dotnet behavior and wire dotnet into language test matrix.
- Update docs and nextest profiles to reflect supported dotnet hooks.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/languages.md | Documents dotnet language support, language_version, and additional_dependencies. |
| crates/prek/tests/run.rs | Updates an invalid-config test now that dotnet supports deps (uses swift instead). |
| crates/prek/tests/languages/main.rs | Registers the new dotnet language test module. |
| crates/prek/tests/languages/dotnet.rs | Adds end-to-end integration tests for dotnet hooks, versions, deps, and error handling. |
| crates/prek/tests/common/mod.rs | Adds an insta output filter intended for dotnet version output. |
| crates/prek/src/store.rs | Adds ToolBucket::Dotnet for tool storage. |
| crates/prek/src/languages/version.rs | Adds LanguageRequest::Dotnet parsing/satisfaction plumbing. |
| crates/prek/src/languages/mod.rs | Wires dotnet into supported languages, tool buckets, version support, install/run/health dispatch. |
| crates/prek/src/languages/dotnet/version.rs | Implements dotnet language_version parsing and matching (major / major.minor / exact / netX.Y). |
| crates/prek/src/languages/dotnet/mod.rs | Adds the dotnet language module exports. |
| crates/prek/src/languages/dotnet/installer.rs | Implements system discovery + managed install via dotnet-install scripts. |
| crates/prek/src/languages/dotnet/dotnet.rs | Implements hook install/run/health-check and dependency installation for dotnet hooks. |
| crates/prek-consts/src/env_vars.rs | Adds DOTNET_ROOT env var constant. |
| .github/workflows/ci.yml | Installs .NET in CI for the dotnet language matrix entry. |
| .config/nextest.toml | Adds a lang-dotnet nextest profile to run dotnet language tests. |
There was a problem hiding this comment.
Pull request overview
Adds first-class .NET (dotnet) language support to prek, including SDK version selection and dotnet tool installation for hooks.
Changes:
- Implement
dotnetlanguage: SDK discovery/download + hook execution environment setup. - Add dotnet-specific tests, nextest profile, and CI setup-dotnet wiring.
- Update documentation to describe supported dotnet behavior and configuration options.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/languages.md | Documents dotnet language support, language_version, and additional_dependencies. |
| crates/prek/tests/run.rs | Updates an “invalid config” test to use swift instead of dotnet. |
| crates/prek/tests/languages/main.rs | Registers new dotnet language test module. |
| crates/prek/tests/languages/dotnet.rs | Adds integration tests for dotnet language behavior. |
| crates/prek/tests/common/mod.rs | Adds an insta filter for dotnet version output. |
| crates/prek/src/store.rs | Introduces a Dotnet tool bucket for caching/install locations. |
| crates/prek/src/languages/version.rs | Adds parsing/dispatch for LanguageRequest::Dotnet. |
| crates/prek/src/languages/mod.rs | Wires the dotnet language into install/health/run and capability flags. |
| crates/prek/src/languages/dotnet/mod.rs | Adds dotnet language module exports. |
| crates/prek/src/languages/dotnet/version.rs | Implements dotnet SDK version request parsing and matching. |
| crates/prek/src/languages/dotnet/installer.rs | Implements system discovery + managed SDK download via dotnet-install scripts. |
| crates/prek/src/languages/dotnet/dotnet.rs | Implements hook install/run logic and dotnet tool installation. |
| crates/prek-consts/src/env_vars.rs | Adds DOTNET_ROOT env var constant. |
| .github/workflows/ci.yml | Installs dotnet in CI for the dotnet language test matrix entry. |
| .config/nextest.toml | Adds a nextest profile to run only dotnet language tests. |
There was a problem hiding this comment.
Pull request overview
Adds first-class .NET hook support to prek (pre-commit reimplementation), including SDK version selection, dotnet tool installation for additional_dependencies, and accompanying docs/CI/test coverage.
Changes:
- Introduce a new
dotnetlanguage implementation with SDK discovery/download and tool installation. - Add integration + unit tests for
.NETbehavior and wire them intonextest+ CI language matrix. - Update user documentation to reflect
.NETsupport and configuration options.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/languages.md | Documents .NET language support, language_version, and additional_dependencies. |
| crates/prek/tests/run.rs | Updates invalid-config test to use swift now that dotnet supports deps. |
| crates/prek/tests/languages/main.rs | Registers the new dotnet language test module. |
| crates/prek/tests/languages/dotnet.rs | Adds end-to-end integration tests for .NET hooks and behaviors. |
| crates/prek/src/store.rs | Adds ToolBucket::Dotnet for storing managed SDK assets. |
| crates/prek/src/languages/version.rs | Adds LanguageRequest::Dotnet parsing and satisfaction checks. |
| crates/prek/src/languages/mod.rs | Wires the dotnet language into install/health/run dispatch and capability flags. |
| crates/prek/src/languages/dotnet/version.rs | Implements .NET language_version parsing (major/minor/patch + TFM-like forms). |
| crates/prek/src/languages/dotnet/mod.rs | Introduces the dotnet language module structure/exports. |
| crates/prek/src/languages/dotnet/installer.rs | Implements SDK discovery, managed install, and version querying for .NET. |
| crates/prek/src/languages/dotnet/dotnet.rs | Implements hook install/run/health for .NET + dotnet tool installation. |
| crates/prek-consts/src/env_vars.rs | Adds DOTNET_ROOT env var constant. |
| .github/workflows/ci.yml | Adds .NET setup step and includes dotnet in the language test matrix. |
| .config/nextest.toml | Adds lang-dotnet nextest profile for dotnet-specific tests. |
There was a problem hiding this comment.
Pull request overview
Adds first-class .NET hook support to prek (a Rust reimplementation of pre-commit) by introducing a dotnet language implementation that can resolve/install SDK versions and install .NET tools declared as hook dependencies.
Changes:
- Implement
dotnetlanguage support: SDK version request parsing, SDK discovery/installation (system-first, then managed), andadditional_dependenciesviadotnet tool install --tool-path. - Add end-to-end language tests for
.NEThooks and wire them into the language test suite. - Update docs and CI/nextest profiles to include
dotnet.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/languages.md | Documents new dotnet language support, language_version, and additional_dependencies format. |
| crates/prek/tests/run.rs | Updates an “invalid additional_dependencies” test to use swift now that dotnet supports deps. |
| crates/prek/tests/languages/main.rs | Registers the new dotnet language test module. |
| crates/prek/tests/languages/dotnet.rs | Adds integration tests covering version selection, deps install, stderr capture, and env isolation. |
| crates/prek/src/store.rs | Adds ToolBucket::Dotnet to store managed SDK installs under tools/dotnet. |
| crates/prek/src/languages/version.rs | Adds LanguageRequest::Dotnet dispatch for parsing/satisfaction checks. |
| crates/prek/src/languages/mod.rs | Wires Language::Dotnet into support lists, buckets, and install/run/health dispatch. |
| crates/prek/src/languages/dotnet/mod.rs | Adds the dotnet language module exports (installer + version parsing). |
| crates/prek/src/languages/dotnet/version.rs | Implements .NET SDK request parsing and matching logic. |
| crates/prek/src/languages/dotnet/installer.rs | Implements system discovery + managed installation via official dotnet-install scripts. |
| crates/prek/src/languages/dotnet/dotnet.rs | Implements hook install/run/health for .NET and installs tool deps into an env-local tool path. |
| crates/prek-consts/src/env_vars.rs | Adds DOTNET_ROOT env var constant for hook execution. |
| .github/workflows/ci.yml | Adds .NET setup step and includes dotnet in the language-test matrix. |
| .config/nextest.toml | Adds a lang-dotnet nextest profile to run dotnet language tests. |
99bb4cc to
a060d43
Compare
There was a problem hiding this comment.
Pull request overview
Adds first-class .NET hook support to prek, including SDK selection and dotnet tool installation, and wires it into the project’s language test matrix + documentation.
Changes:
- Implement
language: dotnetwithlanguage_versionparsing and managed SDK installation fallback. - Support
additional_dependenciesby installing dotnet tools into an isolated--tool-pathand exposing them viaPATHat runtime. - Add dotnet language integration tests, nextest profile, CI setup, and update docs to reflect support.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/languages.md | Documents .NET support, language_version, and additional_dependencies behavior. |
| crates/prek/tests/run.rs | Updates the “invalid additional_dependencies” test case to use swift now that dotnet supports deps. |
| crates/prek/tests/languages/main.rs | Registers the new dotnet language test module. |
| crates/prek/tests/languages/dotnet.rs | Adds end-to-end tests for dotnet SDK selection, tool install, and type filtering. |
| crates/prek/src/store.rs | Adds a ToolBucket::Dotnet to store managed SDK installs. |
| crates/prek/src/languages/version.rs | Adds DotnetRequest wiring into LanguageRequest parsing/satisfaction checks. |
| crates/prek/src/languages/mod.rs | Enables dotnet as a supported language impl (install/run/health + buckets/version/deps support). |
| crates/prek/src/languages/dotnet/mod.rs | Introduces the dotnet language module exports. |
| crates/prek/src/languages/dotnet/version.rs | Implements dotnet language_version parsing + unit tests. |
| crates/prek/src/languages/dotnet/installer.rs | Implements system discovery + managed SDK installation via dotnet-install scripts. |
| crates/prek/src/languages/dotnet/dotnet.rs | Implements hook install/run/health for dotnet + tool installation logic. |
| crates/prek-consts/src/env_vars.rs | Adds DOTNET_ROOT env var constant. |
| .github/workflows/ci.yml | Adds dotnet to the language-test matrix and installs .NET for those jobs. |
| .config/nextest.toml | Adds lang-dotnet nextest profile for CI language tests. |
There was a problem hiding this comment.
Pull request overview
Adds first-class .NET (language: dotnet) support to prek, aligning it with how pre-commit manages dotnet tool-based hooks while also adding SDK resolution/installation and CI coverage.
Changes:
- Implement
.NETlanguage support with SDK discovery/managed installation and per-hookdotnet toolinstallation viaadditional_dependencies. - Add
.NETversion request parsing (language_version) and integrate it into the shared language-version dispatch. - Add integration tests and CI/nextest wiring for dotnet, plus documentation updates.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/languages.md | Documents dotnet support, language_version, and additional_dependencies formats. |
| crates/prek/tests/run.rs | Updates invalid-config test case to use swift (since dotnet now supports deps). |
| crates/prek/tests/languages/main.rs | Registers the new dotnet language test module. |
| crates/prek/tests/languages/dotnet.rs | Adds dotnet integration tests (SDK versions, deps install, stderr capture, etc.). |
| crates/prek/src/store.rs | Adds a ToolBucket::Dotnet bucket for managed SDK storage. |
| crates/prek/src/languages/version.rs | Wires DotnetRequest into LanguageRequest parsing/satisfaction checks. |
| crates/prek/src/languages/mod.rs | Registers the dotnet language implementation and enables language_version support. |
| crates/prek/src/languages/dotnet/version.rs | Implements parsing/handling of dotnet version requests (+ unit tests). |
| crates/prek/src/languages/dotnet/mod.rs | Adds the dotnet language module structure and exports. |
| crates/prek/src/languages/dotnet/installer.rs | Implements system/managed SDK discovery + dotnet-install based downloads. |
| crates/prek/src/languages/dotnet/dotnet.rs | Implements install/run/health-check for dotnet hooks + tool installation logic. |
| crates/prek-consts/src/env_vars.rs | Adds DOTNET_ROOT env var constant. |
| .github/workflows/ci.yml | Adds dotnet to the language-test matrix and installs .NET for those runs. |
| .config/nextest.toml | Adds a lang-dotnet nextest profile. |
|
Appreciate the great contributions, just a friendly reminder to take some rest too! |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
916863f to
cdd5ccb
Compare
cdd5ccb to
793b97e
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds first-class .NET (dotnet) language support to prek, including SDK resolution/installation and support for installing .NET tools as hook additional_dependencies, plus docs/CI updates to validate behavior.
Changes:
- Add
dotnetlanguage implementation with SDK discovery + managed installation via official dotnet-install scripts, and PATH/DOTNET_ROOT wiring at runtime. - Support
language_versionparsing for .NET (major / major.minor / exact /netX.Y-style) and add a dedicated tool bucket for managed SDKs. - Add dotnet-focused integration tests and wire them into nextest profiles + CI.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/languages.md | Documents dotnet support, language_version, and additional_dependencies format. |
| crates/prek/tests/run.rs | Updates an “invalid config” snapshot to use swift now that dotnet supports additional deps. |
| crates/prek/tests/languages/main.rs | Registers the new dotnet language test module. |
| crates/prek/tests/languages/dotnet.rs | Adds end-to-end CLI tests for dotnet SDK selection, managed installs, tool deps, stderr capture, etc. |
| crates/prek/src/store.rs | Adds ToolBucket::Dotnet for storing managed SDK installations. |
| crates/prek/src/languages/version.rs | Wires LanguageRequest::Dotnet parsing/satisfaction into the generic language_version system. |
| crates/prek/src/languages/mod.rs | Integrates dotnet into language dispatch and capability flags (version + additional deps). |
| crates/prek/src/languages/dotnet/version.rs | Implements .NET language_version parsing + matching logic with unit tests. |
| crates/prek/src/languages/dotnet/mod.rs | Declares dotnet submodules and re-exports. |
| crates/prek/src/languages/dotnet/installer.rs | Implements SDK discovery + managed install using dotnet-install scripts; includes unit tests. |
| crates/prek/src/languages/dotnet/dotnet.rs | Implements hook install/run/health-check for dotnet and tool dependency installation. |
| crates/prek-consts/src/env_vars.rs | Adds DOTNET_ROOT env var constant. |
| .github/workflows/ci.yml | Installs .NET in CI for the dotnet language test matrix entry. |
| .config/nextest.toml | Adds a lang-dotnet nextest profile filtering dotnet language tests. |
There was a problem hiding this comment.
Pull request overview
Adds first-class .NET hook support to prek, including SDK version management and dotnet tool-based additional_dependencies, plus CI + test coverage to validate behavior.
Changes:
- Implement
dotnetlanguage withlanguage_versionparsing, SDK discovery/download via official install scripts, and tool installation viadotnet tool install --tool-path. - Wire
dotnetinto the language registry/version request plumbing and store tool buckets. - Add integration tests + nextest profile, and extend CI to provision .NET for the language test matrix.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/languages.md | Documents .NET support, language_version, and additional_dependencies format. |
| crates/prek/tests/run.rs | Updates an invalid-config test to use swift now that dotnet supports deps. |
| crates/prek/tests/languages/main.rs | Registers the new dotnet language test module. |
| crates/prek/tests/languages/dotnet.rs | Adds integration tests for SDK version selection, tool installs, and output behavior. |
| crates/prek/src/store.rs | Adds a Dotnet tool bucket for managed SDK installs. |
| crates/prek/src/languages/version.rs | Adds DotnetRequest plumbing into LanguageRequest. |
| crates/prek/src/languages/mod.rs | Registers dotnet language implementation and capability flags. |
| crates/prek/src/languages/dotnet/version.rs | Implements .NET language_version parsing + unit tests. |
| crates/prek/src/languages/dotnet/mod.rs | Adds dotnet module wiring and re-exports. |
| crates/prek/src/languages/dotnet/installer.rs | Implements system/managed SDK discovery + dotnet-install (sh/ps1) execution. |
| crates/prek/src/languages/dotnet/dotnet.rs | Implements install/run/health-check and dotnet tool dependency installation. |
| crates/prek-consts/src/env_vars.rs | Adds DOTNET_ROOT env var constant. |
| .github/workflows/ci.yml | Installs .NET for the dotnet language test matrix job. |
| .config/nextest.toml | Adds lang-dotnet profile for isolating dotnet language tests. |
|
Pretty happy with where this is now, will publish a chsharpier mirror and poke around a bit with a proper build of this tomorrow. Any help with Windows would be nice too since I don't have a box to hand. |
|
If anyone wants to have a go, try with this config. Works pretty nice on my machine for now |
Hi, I thought I'd give a stab at dotnet support for prek. Not really an amazing language for how it manages tools & its toolchain, so perhaps some nastiness. Seems to work for
csharpierat least for me.There's some missing tests around the windows part of the code in the coverage but I didn't want to get into messing with CI for windows runners, maybe we can drop the powershell stuff if we make windows people run in a bash type environment?
Not very versed in rust but hoping that even if stuff's bad there's a bit of a start for someone better than I to have a stab at.